//#define DEBUG

#include "inc/system.h"
#include "inc/print.h"
#include "inc/math.h"

volatile unsigned long long ull1;
volatile unsigned long long ull2;
volatile unsigned long long ull3;

volatile long long ll1;
volatile long long ll2;
volatile long long ll3;

volatile unsigned int uii1;
volatile unsigned int uii2;
volatile unsigned int uii3;

volatile int ii1;
volatile int ii2;
volatile int ii3;

void setv(double val1, double val2){
  ull1 = (unsigned long long)val1;
  ull2 = (unsigned long long)val2;
  ll1 = (long long)val1;
  ll2 = (long long)val2;
  uii1 = (unsigned int)val1;
  uii2 = (unsigned int)val2;
  ii1 = (int)val1;
  ii2 = (int)val2;
}
double getull(){
  return (double)(ull3);
}
double getll(){
  return (double)(ll3);
}
double getuii(){
  return (double)(uii3);
}
double getii(){
  return (double)(ii3);
}

void test0(){
  ull3 = ull1 * ull2;
}
void test1(){
  ll3 = ll1 * ll2;
}
void test2(){
  ull3 = ull1 / ull2;
}
void test3(){
  ull3 = ull1 % ull2;
}
void test4(){
  ll3 = ll1 / ll2;
}
void test5(){
  ll3 = ll1 % ll2;
}


void test10(){
  uii3 = uii1 * uii2;
}
void test11(){
  ii3 = ii1 * ii2;
}
void test12(){
  uii3 = uii1 / uii2;
}
void test13(){
  uii3 = uii1 % uii2;
}
void test14(){
  ii3 = ii1 / ii2;
}
void test15(){
  ii3 = ii1 % ii2;
}

int main()
{
  print("v1,v2? \r\n");
  while(1){
    double v1 = scanDouble();
    double v2 = scanDouble();
    
    
    print(" ull* ");setv(v1, v2);test0();printDouble(getull());print("\r\n");
    print(" sll* ");setv(v1, v2);test1();printDouble(getll());print("\r\n");
    print(" ull/ ");setv(v1, v2);test2();printDouble(getull());print("\r\n");
    print(" ull% ");setv(v1, v2);test3();printDouble(getull());print("\r\n");
    print(" sll/ ");setv(v1, v2);test4();printDouble(getll());print("\r\n");
    print(" sll% ");setv(v1, v2);test5();printDouble(getll());print("\r\n");

    print(" uii* ");setv(v1, v2);test10();printDouble(getuii());print("\r\n");
    print(" sii* ");setv(v1, v2);test11();printDouble(getii());print("\r\n");
    print(" uii/ ");setv(v1, v2);test12();printDouble(getuii());print("\r\n");
    print(" uii% ");setv(v1, v2);test13();printDouble(getuii());print("\r\n");
    print(" sii/ ");setv(v1, v2);test14();printDouble(getii());print("\r\n");
    print(" sii% ");setv(v1, v2);test15();printDouble(getii());print("\r\n");

    double v3 = v1 + v2;
    double v4 = v1 - v2;
    double v5 = v1 * v2;
    double v6 = v1 / v2;
    double v7 = sin(v1);
    double v8 = cos(v1);
    print(" f+ ");printDouble(v3);print("\r\n");
    print(" f- ");printDouble(v4);print("\r\n");
    print(" f* ");printDouble(v5);print("\r\n");
    print(" f/ ");printDouble(v6);print("\r\n");
    print(" sin ");printDouble(v7);print("\r\n");
    print(" cos ");printDouble(v8);print("\r\n");


    
  }
  return 0;
  
}
